package com.lxy.demo.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lxy.demo.entity.ReplyDetail;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ReplyDetailMapper extends BaseMapper<ReplyDetail> {

    @Select(" select * from `reply_detail` where invid = #{id}")
    List<ReplyDetail> selectReply(@Param("id") Integer id);

//    @Insert(" insert into reply_detail values(id,#{invid},#{content},#{author},#{createdate})")
//    int addSelective(ReplyDetail replyDetail);

    @Delete(" delete  from `reply_detail` where invid = #{id} ")
    int delRep(Integer id);

    @Select(" select * from `reply_detail` where invid = #{id}")
    List<ReplyDetail> findRep(Integer id);
}